using Gameplay.PVE.Entity;
using UnityEngine;
using Yoozoo.Libs;

namespace Gameplay.PVE.Skill
{
    //主动技能位移的控制
    public abstract class SkillInitiativeMover : IClass
    {
        void IClass.OnReset()
        {
            
        }

        protected UnitBase unit;
        protected Vector3 startPosition;
        protected Vector3 endPosition;
        protected SkillBase skill;
        public bool moveFinished;
        public bool backFinished;
        
        public void Init(UnitBase unit,SkillBase skill)
        {
            moveFinished = false;
            backFinished = false;
            this.skill = skill;
            this.unit = unit;
        }

        public virtual void Start(Vector3 startPosition,Vector3 endPosition)
        {
            this.startPosition = startPosition;
            this.endPosition = endPosition;
            moveFinished = false;
            backFinished = false;
        }

        public virtual void Recover()
        {
            
        }

        public virtual void Update()
        {
            
        }

        public virtual void End()
        {
            moveFinished = false;
            backFinished = false;
        }

        public virtual void ForceStop()
        {
            
        }
    }
}